# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Blue Peppers <bluepeppers@archlinux.us>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Yannick LM <LMyannicklm1337@gmail.com>

pkgname=tint2
pkgver=17.0.2
pkgrel=3
pkgdesc='Basic, good-looking task manager for WMs'
arch=(loong64 x86_64)
url='https://gitlab.com/o9000/tint2'
license=(GPL2)
depends=(gtk3 imlib2 startup-notification)
makedepends=(cmake git ninja setconf)
source=("git+$url#commit=f8f9c18cef88239688c62fdba70db9b082e1f0f4") # tag: v17.0.2
b2sums=(SKIP)

prepare() {
  setconf $pkgname/get_version.sh VERSION="$pkgver"
}

build() {
  mkdir -p build
  cd build
  cmake ../$pkgname \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D ENABLE_TINT2CONF=1 \
    -G Ninja
  ninja
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}

# getver: gitlab.com/o9000/tint2/raw/master/README.md
